# -*- coding: utf-8 -*-
# @Time: 2025/5/29 17:08
# @Author: foxhuty
# @File: crawling_video_1.py

import requests
import json
import os
import time
import random
import re
import csv
from pprint import pprint
from moviepy.editor import *

url = "https://www.acfun.cn/v/ac36564705"
headers = {
    "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 Edg/129.0.0.0"
}
response = requests.get(url=url, headers=headers)
html = response.text
# print(html)
title = re.findall(r'"title":"(.*?)"', html)[1]
pprint(title)
info = re.findall(r'window.pageInfo = window.videoInfo = (.*?);', html)[0]
# print(info)
json_data = json.loads(info)
# m3u8_url = json.loads(json_data[''])
pprint(json_data)
